//
//  KYSettingLabelItem.m
//  KYKJPackDemo
//
//  Created by Jordan zhou on 2017/9/21.
//  Copyright © 2017年 ???. All rights reserved.
//

#import "KYSettingLabelItem.h"

@implementation KYSettingLabelItem
- (NSString *)text
{
    id value = [KYUserDefaults objectForKey:self.key];
    
    if (value == nil) {
        return self.defaultText;
    } else {
        return value;
    }
}

- (void)setText:(NSString *)text
{
    [KYUserDefaults setObject:text forKey:self.key];
    [KYUserDefaults synchronize];
}
@end
